package com.example.bootdemo.dao;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.example.bootdemo.model.Emp;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface EmpMapper extends BaseMapper<Emp> {
  //  @SqlParser(filter = true)
    @Select("select * from user ${ew.customSqlSegment}")
    List<Emp> mySelectList(@Param(Constants.WRAPPER) Wrapper<Emp> wrapper);

    int deleteAll();

    int insertBatchSomeColumn(List<Emp> list);

    int deleteByIdWithFill(Emp user);

    int alwaysUpdateSomeColumnById(@Param(Constants.ENTITY) Emp user);
}
